<?php
	$this->pageTitle = Yii::t('Member', 'SEO - Member Signup Title');
	Yii::app()->clientScript->registerMetaTag(Yii::t('Member', 'SEO - Member Signup Description'), 'description');
	Yii::app()->clientScript->registerMetaTag(Yii::t('Member', 'SEO - Member Signup Keywords'), 'keywords');
	Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl.'/css/module/lief/jquery-ui.css');
	Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl.'/css/module/lief/cropbox/jquery.cropbox.css');
	Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl.'/css/module/lief/grid.css');
	Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl.'/css/module/lief/normalize.min.css');
	Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl.'/css/module/lief/styles.css');
	Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl.'/css/module/lief/login.css');
	Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl.'/css/module/lief/responsive.css');
	Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl.'/css/module/lief/lovedone.css');
	Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl.'/css/module/lief/signup.css');
	
	Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl.'/plugins/video/videopopup.css');
	Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/plugins/video/videopopup.min.js', CClientScript::POS_BEGIN);
	Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/jquery.ui.widget.js', CClientScript::POS_END);
	Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/jquery.fileupload.js', CClientScript::POS_END);
	Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/jpegcam.js', CClientScript::POS_END);
	Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/cropbox/hammer.js', CClientScript::POS_END);
	Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/cropbox/jquery.mousewheel.js', CClientScript::POS_END);
	Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/cropbox/jquery.cropbox.js', CClientScript::POS_END); 
	Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/script.js', CClientScript::POS_END);
	Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/datepickerMultiLanguage.js', CClientScript::POS_END);
	Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/jquery-ui-1.9.2.custom.min.js', CClientScript::POS_END);
	Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/memberCamara.js', CClientScript::POS_END);
	Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/main.js', CClientScript::POS_END);
?>
<style>
#ui-datepicker-div{width:315px;}
</style>
		<div class="mainline"></div>
		<h2><?php echo Yii::t("Member", "Create your Lief Account") ?></h2>
		<div class="mainline"></div>
		<div class="clearfix text-center" style="margin-bottom: 10px;">
			<?php echo CHtml::beginForm('', 'post', array( 'id'=>'signup_form' )); ?>
				<?php echo CHtml::hiddenField('Avatar', $avatar, array('id'=>'hid_SignUp_Avatar')) ?>
				<ul id="signup_form-box" class="clear-fix">
					<li class="col">
						<center>
							<!--<div class="avatar-wrap">-->
<!--								<div class="default-avatar">
									<img src="<?php echo ($avatar=='') ? Yii::app()->request->baseUrl.'/img/module/lief/skin-2014/default-avatar.jpg' : Yii::app()->request->baseUrl.$avatar; ?>" width="200px"/>
								</div>-->
								<div class="introduction_video video">
									<a href="#">
										<img class="video" src="<?php echo Yii::app()->request->baseUrl.'/img/module/lief/skin-2014/video.jpg' ?>" width="400" height="215" />
										<span class="icon_player video"></span>
									</a>
								</div>
								<!--<center>-->
<!--									<div id="divAvatarChooser">
										<a href="javascript:void(0);" title="<?php // echo "<ul><li data-value='upload' onclick='window.registerForm.onAvatarClick(this);'>" . Yii::t('Member', 'Upload a picture') . "</li><li data-value='take' onclick='window.registerForm.onAvatarClick(this);'>" . Yii::t('Member', 'Take a picture') . "</li></ul>" ?>"><?php // echo Yii::t('Member', 'Add Avatar') ?></a>
									</div>
									<div id="Avatar_Error" class="inline-error" style="clear: left;"><?php // echo $frmSignup->getError('Avatar') ?></div>-->
								<!--</center>-->
								
							<!--</div>-->
						</center>
					</li>
					<li class="col">
						<center>
							<div class="text-center">
								<?php
									echo CHtml::activeTextField($frmSignup,'FirstName',array(
										'id'=>'SignUp_FirstName',
										'class'=>'textfield',
										'placeholder'=>Yii::t("Member", 'First Name'),
										'autocomplete'=>'off',
									));
								?>
								<!--<div class="inline-error"><?php // echo $frmSignup->getError('FirstName') ?></div>-->
							</div>
							<div class="text-center">
								<?php
//									echo CHtml::activeTextField($frmSignup,'Surname',array(
//										'id'=>'SignUp_Surname',
//										'class'=>'textfield',
//										'placeholder'=>Yii::t("Member", 'Family Name'),
//										'autocomplete'=>'off',
//									));
								?>
								<div class="inline-error"><?php // echo $frmSignup->getError('Surname') ?></div>
							</div>
							<div class="text-center">
								<?php
									echo CHtml::activeTextField($frmSignup,'Email',array(
										'id'=>'SignUp_Email',
										'class'=>'textfield',
										'placeholder'=>Yii::t("Member", 'Email Address'),
										'autocomplete'=>'off',
									));
								?>
								<div class="inline-error"><?php echo $frmSignup->getError('Email') ?></div>
							</div>
							<div>
								<?php
									echo CHtml::activeDropDownList($frmSignup,'Sex', array(
										''=>Yii::t("Member", 'Gender'),
										'1'=>Yii::t("Member", 'Male'),
										'2'=>Yii::t("Member", 'Female'),
										), array(
										'id'=>'SignUp_Sex',
										'options'=>array(
											''=>array('disabled'=>true),		
										),
									));
								?>
								<div class="inline-error" id="Sex_Error"><?php // echo $frmSignup->getError('Sex') ?></div>
							</div>
							
<!--							<div class="text-center">
							    <input type="text" id="Birthday" class="textfield" 
							           placeholder="<?php // echo Yii::t("Member", 'Birthday');?>"
							           autocomplete="off">
								<?php
//									echo CHtml::activeHiddenField($frmSignup, 'Birthday',array('id'=>'birthday_formart'));
								?>
								<div class="inline-error" id="Birthday_Error"><?php // echo $frmSignup->getError('Birthday') ?></div>
							</div>-->
							
							<div>
								<?php
//									$defaultLang = new LanguageComponent();
//									$defaultLangID = $defaultLang->setDefaultLanguageForSignup();
//									$langsMeta = array(
//		                    			''=>array('disabled'=>true),		
//		                    		);
//									$langsOption = array(""=>Yii::t("Member", 'Preferred Language'));
//									foreach($langs as $l) {
//										$langsOption[$l['ID']] = $l['NameCountry'];
//										if($defaultLangID==$l['ID']){
//											$langsMeta[$l['ID']] = array('data-class'=>$l['CountryCode'], 'data-imagecss'=>$l['Css'], 'data-image'=>$l['Flag'], 'selected'=>'selected');
//										}
//										else{
//											$langsMeta[$l['ID']] = array('data-class'=>$l['CountryCode'], 'data-imagecss'=>$l['Css'], 'data-image'=>$l['Flag']);
//										}
//									}
//									echo CHtml::activeDropDownList($frmSignup,'Language', $langsOption,array('id'=>'SignUp_Language','options'=>$langsMeta,));
								?>
								<!--<div class="inline-error" id="Language_Error"><?php // echo $frmSignup->getError('Language') ?></div>-->
							</div>
							
							<div class="text-center">
								<?php
									echo CHtml::activePasswordField($frmSignup,'Password',array(
										'id'=>'SignUp_Password',
										'class'=>'textfield',
										'placeholder'=>Yii::t("Member", 'Password (min 8 characters)'),
									));
								?>
								<div class="inline-error"><?php // echo $frmSignup->getError('Password') ?></div>
							</div>
							<div class="text-center">
								<?php
									echo CHtml::activePasswordField($frmSignup,'ConfirmPassword',array(
										'name'=>'ConfirmPassword',
										'id'=>'SignUp_ConfirmPassword',
										'class'=>'textfield',
										'placeholder'=>Yii::t("Member", 'Confirm Password'),
									));
								?>
								<div class="inline-error"><?php // echo $frmSignup->getError('ConfirmPassword') ?></div>
							</div>
							<div class="text-left">
							     <?php echo Yii::t("Member", 'I agree with the {url}Privacy Statement{/url}', array('{url}'=>'<a target="new" href="'. Yii::app()->params['liefDomain'].'/lief/main/privacy'. '">','{/url}'=>'</a>'));?>
							</div>
							
							<div class="text-center">
								<?php
									echo CHtml::button(Yii::t("Member", 'Sign Up'),array(
										'class'=>'btn disabled',
										'id'=>'btnSignUp',
										'type'=>'submit',
									));
								?>
							</div>
						</center>
					</li>
				</ul>
			<?php echo CHtml::endForm(); ?>
		</div>
		<div class="mainline"></div>
		<div id="social-login-box" class="clearfix">
			<h2><?php echo Yii::t("Member", 'You could also...') ?></h2>
			<ul id="socialbtns-box" class="clear-fix">
				<li class="col">
					<center>
						<a href="<?php echo Yii::app()->createUrl('auth/member/facebooklogin'); ?>" title="<?php echo Yii::t("Member", 'Sign up with Facebook') ?>">
							<div class="fbbtn"><?php echo Yii::t("Member", 'Sign up with Facebook') ?></div>
						</a>
					</center>
				</li>
				<li class="col">
					<center>
						<a href="<?php echo Yii::app()->createUrl('auth/member/linkedinlogin'); ?>" title="<?php echo Yii::t("Member", 'Sign up with LinkedIn') ?>">
							<div class="libtn"><?php echo Yii::t("Member", 'Sign up with LinkedIn') ?></div>
						</a>
						
					</center>
				</li>
				<li class="col">
					<center>
						<a href="<?php echo Yii::app()->createUrl('auth/member/twitterlogin'); ?>" title="<?php echo Yii::t("Member", 'Sign up with Twitter') ?>">
							<div class="ttbtn"><?php echo Yii::t("Member", 'Sign up with Twitter')  ?></div>
						</a>
					</center>
				</li>
				<!--<li class="col"><center><a href="/member/signup#" title="This feature is coming soon"><div class="imbtn">Sign up with Intimedia</div></a></center></li>-->
			</ul>
		</div>
<input style="visibility: hidden" id="fileupload" type="file" name="uploadAvatar"  accept="image/*">
<div id="upload-photo-box" class="common-popup-wrap"><div class="contentWrap"></div></div>
<div id="take-photo-box" class="common-popup-wrap"><div class="contentWrap"></div></div>
<?php $this->widget('application.modules.auth.widget.DatePicKerTranslate'); ?>
<?php
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/jquery.ui.widget.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/jquery.fileupload.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/jpegcam.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/cropbox/hammer.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/cropbox/jquery.mousewheel.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/cropbox/jquery.cropbox.js', CClientScript::POS_END); 
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/script.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/datepickerMultiLanguage.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/jquery-ui-1.9.2.custom.min.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/memberCamara.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/module/lief/main.js', CClientScript::POS_END);
?>
<script>
	var Dictionary = {
		MessageOfRequiredFirstName: '<?php echo Yii::t('Member', 'Please enter your first name') ?>',
		MessageOfRequiredSurname: '<?php echo Yii::t('Member', 'Please enter your surname') ?>',
		SelectTextOfGenderField: '<?php echo Yii::t('Member', 'Please select a gender') ?>',
		MessageOfRequiredBirthday: '<?php echo Yii::t('Member', 'Please choose your birthday') ?>',
		MessageOfRequiredLanguage: '<?php echo Yii::t('Member', 'Please choose preferred language') ?>',
		MessageOfRequiredEmail: '<?php echo Yii::t('Member', 'Please enter your email address') ?>',
		ErrorInvalidEmail: '<?php echo Yii::t('Member', 'Invalid Email.') ?>',
		EmptyPassword: '<?php echo Yii::t('Member','Password cannot be blank') ?>',
		MaxLengthPassword: '<?php echo Yii::t('Member', 'The password must be at least 8 characters in length') ?>',
		InvalidPassword: '<?php echo Yii::t('Member','The password must contain lower case AND upper case characters') ?>',
		ConfirmPasswordNotMatch: '<?php echo Yii::t('Member','The passwords do not match') ?>',
		MessageOfRequiredAvatar: '<?php echo Yii::t('Member', 'Please choose an avatar') ?>',
	    LabelUploadAPhoto: '<?php echo Yii::t('Member', 'Upload a picture') ?>',
	    LabelTakeAPhoto: '<?php echo Yii::t('Member', 'Take a picture') ?>',
	    GenderFieldOfPersonalForm: '<?php echo Yii::t('Member', 'Gender') ?>',
	    LabelChangePicture: '<?php echo Yii::t('Member', 'Change picture') ?>',
	    LabelUploading: '<?php echo Yii::t('Member', 'Uploading %s') ?>',
	    SaveButton: '<?php echo Yii::t('Member', 'Save') ?>',
	    TakeAPhotoButton: '<?php echo Yii::t('Member', 'Take picture') ?>',
	    TakeAPhotoText: '<?php echo Yii::t('Member', 'Picture via webcam') ?>',
	    MessageOnMemberFacebookWall: '',
	    NoCamera:'<?php echo Yii::t('Message', 'Camera not found') ?>',
        TakeWithWebCam:'<?php echo Yii::t('Message', 'Take with webcam') ?>'
	};
	(function ($){
	    $('#SignUp_ConfirmPassword').click(function(){
	    	$("#btnSignUp").attr('class', "btn");
	     });
		 
		 $(".video").videopopup({
			'videoid' : '21504557',
			'videoplayer' : 'vimeo', //options - youtube or vimeo
			'autoplay' : 'true',// options - true or false
			'width' : '700',
			'height' : '400'
		});
	})(jQuery);
	
</script>
